<%@ page import="gdepot.Cart" %>
<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main">
    <g:set var="entityName" value="${message(code: 'cart.label', default: 'Cart')}"/>
    <title><g:message code="default.list.label" args="[entityName]"/></title>
</head>

<body>

<div class="row">
    <div class="container">
        <ol class="breadcrumb">
            <li>Mine Cart</li>
        </ol>
    </div>
</div>

<g:if test="${flash.message}">
    <div class="alert alert-warning">
        <a href="#" class="close" data-dismiss="alert">
        &times;
        </a>
        <strong>${flash.message}</strong>
    </div>
</g:if>


<div class="role">
    <div class="container">

        <g:if test="${cart?.lineItems}">
            <g:render template="/showCart" model="${[cart: cart]}"/>
            <g:form controller="orders" action="create" method="POST">
                <input type="hidden" name="id" value="${cart.id}">
                <input class="btn btn-success btn-block" type="submit" value="${message(code: 'cart.order')}">
            </g:form>
            <div class="pagination">
                <g:paginate total="${cartInstanceCount ?: 0}"/>
            </div>
        </g:if>
        <g:else>
            <h2><g:message code="cart.empty"/> </h2>
        </g:else>

    </div>
</div>
</body>
</html>
